<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var money = 100;
        var flag = true
        do {
            var res = Number(prompt("1:存钱，2：取钱 3：退出"))
            switch (res) {
                case 1:
                    var cun = Number(prompt("存"))
                    money += cun
                    alert("存钱hou" + money)
                    flag = false
                    break;
                case 2:
                    var qu = Number(prompt("取"))
                    money -= qu
                    alert("取钱hou" + money)
                    flag = false
                    break;
                case 3:
                    alert("退出程序")
                    flag = true
                    break
            }
        } while (!flag)
    </script>
</body>

</html>